package test;
import java.io.IOException;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.ResultSetMetaData;

import java.sql.SQLException;

import java.sql.Statement;

import java.util.*;

public class LeagueDB {

        public static void main(String[] args) throws SQLException {
                
                  ArrayList<String> nameResults;
                  ArrayList<String> trueResults;
                  long st = System.nanoTime();
                        LeagueDBquery db = new LeagueDBquery();
                        long et = System.nanoTime();
                        System.out.println("Time to connect is: " + ((et-st)/1000000000) + " seconds");
                        String name = "";
                        String clas = "Tank";
                        int stun = 0;
                        int fear = 0;
                        int disable = 0;
                        int slow = 0;
                        int root = 0;
                        int knockup = 0;
                        int shield = 0;
                        int heal = 0;
                        int msbuff = 0;
                        int asbuff = 0;
                        int invul = 0;
                        int untarget = 0;
                        int invis = 0;
                        int dash = 0;
                        int displace = 0;
                        int silence = 0;
                        int revive = 0;
                        int mitigation = 0;
                        int atkbuff = 0;
                        
                        long sst = System.nanoTime();
                        
                        nameResults = db.query(name, clas, stun, fear, disable, slow, root, knockup, shield, heal
                                        , msbuff, asbuff, invul, untarget, invis, dash, displace, silence, revive, mitigation, atkbuff);
                        /*
                        for(int i = 0; i < nameResults.size();i++) {
                                System.out.println(nameResults.get(i));
                        }*/
                        trueResults = db.attFind(nameResults);
                        long eet = System.nanoTime();
                        System.out.println("Time to query is: " + ((eet-sst)/1000000000) + " seconds");
                        /*
                        for(int i = 0; i < nameResults.size();i++) {
                                System.out.println(trueResults.get(i));
                        }*/
        }               
}